
algotator = {
   priceachat = 0,
   name = "algotator"

}
--Achat de 3/4 de l'argent au début. Revente uniquement si gain.
function algotator:update(simulation, todo)
   local nb = (3 * Anal.money) / (4 * (Anal.current * 1.15))
   if (Pool.currentCycle == 0) and Calcul:isPossibleBuy(nb, Anal.current, Anal.money) then
      algotator.priceachat = Anal.current * 1.15
      todo:acheter(simulation, nb)
   end
   if (Pool.currentCycle ~= 0) and (algotator.priceachat ~= 0) and ((Anal.current * Anal.nb_action * 1.15) > algotator.priceachat) and ((Anal.current * 0.15) > Anal.money) then
      todo:vendre(simulation, simulation.nb_action)
   else
      todo:passe(simulation)
   end
end
      